<div class="card">
  <div class="card-content">
    <div class="row breadcrumb">
      <div class="col-sm-12">
        <el-breadcrumb separator="/">
          <el-breadcrumb-item [routerLink]="{ path: '/admin/dashboard' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item><a href="/">会员管理</a></el-breadcrumb-item>
          <el-breadcrumb-item>会员列表</el-breadcrumb-item>
        </el-breadcrumb>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-12">
        <el-table [model]="tableData" [stripe]="true" width="100%">
          <el-table-column model-key="username" label="帐号" width="180"></el-table-column>
          <el-table-column model-key="level" label="级别" width="100">
            <ng-template #slot let-scope="scope">
              <container-element [ngSwitch]="scope.rowData.level">
                <some-element *ngSwitchCase="0">普通会员</some-element>
                <some-element *ngSwitchCase="1">高级会员</some-element>
                <some-element *ngSwitchCase="2">超级会员</some-element>
              </container-element>
            </ng-template>
          </el-table-column>
          <el-table-column model-key="email" label="邮箱"></el-table-column>
          <el-table-column model-key="mobile" label="联系方式" width="180"></el-table-column>
          <el-table-column model-key="recommend_code" label="推荐码" width="100"></el-table-column>
          <el-table-column model-key="parent_name" label="上线账号"></el-table-column>
          <el-table-column model-key="create_time" label="创建时间"  width="120">
            <ng-template #slot let-scope="scope">
              <span style="margin-left: 10px">{{ scope.rowData.create_time * 1000 | date:'yyyy-MM-dd' }}</span>
            </ng-template>
          </el-table-column>
          <el-table-column model-key="last_ip" label="上次登录IP"  width="180"></el-table-column>
          <el-table-column label="操作" width="120">
            <ng-template #slot let-scope="scope">
              <el-button type="text" size="small" (click)="editRow(scope.rowData, tableData, rowData)">编辑</el-button>
            </ng-template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-12 pagination">
        <el-pagination (modelChange)="paginateChange($event)" [layout]="['prev', 'pager', 'next', 'jumper']" [page-size]="perPage" [total]="total"></el-pagination>
      </div>
    </div>
  </div>
</div>


